<div class="training_nav clearfix">
  <div class="f_l title" (click)="goToStart()">我创建的测试<span>></span>{{className=='null'?'匿名测试':className}}</div>
</div>
<div class="training_container">
  <div class="title ">我创建的测试
    <div class="add" (click)="addTraining()"></div>
  </div>
  <div class="content">
    <div class="setting" [ngClass]="{'setting1':isEdit}" nzTitle="设置" nzPlacement="topCenter" nz-tooltip
         (click)="isEdit=!isEdit"></div>
    <div class="month_test_list" >
      <div class="month_list" *ngFor="let monthTrainings of trainingByMonthGroups;let i =index">
        <div class="month_line">
          <div class="month_circle">{{monthList[i]}}</div>
        </div>
        <div class="test_list" *ngIf="monthTrainings.length>=1">
          <ul class="clearfix">
            <li class="f_l customer-item-content" *ngFor="let training of monthTrainings;let j =index" (click)="jumpRoster(training)">
              <div class="test">
                <div class="test_left f_l">
                  <div class="test_img"></div>
                  <div class="invite_code" *ngIf="!training.codeEnd">
                    <p >邀请码</p>
                    {{training.inviteCode}}
                  </div>
                  <div class="invite_code" *ngIf="training.codeEnd" style="font-size: 12px;cursor: pointer;color:#d23e93;text-decoration: underline" (click)="createCode($event,training)">邀请码已过期点击重新生成</div>
                </div>
                <div class="test_right f_l">
                  <div class="test_title">
                    {{training.name}}
                  </div>
                  <p class="create_time" style="font-weight: bold">{{training.createTime|toDate|date:'yyyy年MM月dd日'}}</p>
                  <div class="peoples">
                    <img src="/assets/img/image/renshu.png" alt="" width="29" height="18" style="cursor: pointer">
                    <span style="display: inline-block;margin-left: 10px;line-height: 18px;vertical-align: middle">{{training.studentNum}}人</span>
                  </div>
                  <div class="edit_logo ">
                    <img src="/assets/img/image/xiugai.png" alt="" width="20" height="21" style="cursor: pointer;margin-right: 6px" *ngIf="isEdit" (click)="modifyOfTraining(training,i,j)">
                    <img src="/assets/img/image/shanchu.png" alt="" width="20" height="21" style="cursor: pointer" *ngIf="isEdit" (click)="deleteOfTraining(training,i,j)">
                    <p class="className" *ngIf="!isEdit">{{training.className?(training.className=='null'?'匿名测试':training.className):'匿名测试'}}</p>
                  </div>
                </div>
              </div>
            </li>
          </ul>
        </div>
        <div class="no_tip" *ngIf="!monthTrainings.length>=1">本月您并没有创建任何测试哟</div>
      </div>
      <!--更多按钮-->
      <div class="month_list">
        <div class="month_line">
          <div class="month_circle_earlier" (click)="getLastMonth()">更早</div>
        </div>
        <div class="more_tip" >←点击查看更多测试</div>
      </div>
    </div>
  </div>
</div>
<!--添加新的测试-->
<app-add-test
  *ngIf="addTest"
  (onCloseAdd)="onCloseAdd($event)"
  [userGuid]="userGuid"
  [training]="modifyTraining"
  [isClassAdd]="isClassAdd"
  [classGuid]="classGuid"
>
</app-add-test>

